package com.ad.platform.api.feign;

import com.ad.payload.dto.PfAdvertisementDto;
import com.ad.payload.dto.PfAdvertisementRenewDto;
import com.ad.payload.model.IdDto;
import com.ad.payload.model.PageDto;
import com.ad.payload.model.PageView;
import com.ad.payload.model.ResultBean;
import com.ad.payload.vo.PfAdvertisementVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.validation.Valid;

/**
 * @author:dxgong
 * @日期 2021/3/17 07:40
 * @注释
 */
@FeignClient(value = "platform-service")
@RequestMapping("/pfAdvertisement")
public interface AdvertisementRemote {

    @RequestMapping(value = "/noAuth/saveOrUpdatePfAdvertisement", method = RequestMethod.POST)
    ResultBean<String> saveOrUpdatePfAdvertisement(@RequestBody @Valid PfAdvertisementDto pfAdvertisementDto);

    @PostMapping("/noAuth/listPagePfAdvertisement")
    ResultBean<PageView<PfAdvertisementVo>> listPagePfAdvertisement(@RequestBody PageDto pageDto);

    @RequestMapping(value = "/noAuth/deletePfAdvertisement", method = RequestMethod.POST)
    ResultBean<String> deletePfAdvertisement(@RequestBody @Valid IdDto idDto);

    @RequestMapping(value = "/noAuth/adRenew", method = RequestMethod.POST)
    ResultBean<String> adRenew(@RequestBody @Valid PfAdvertisementRenewDto pfAdvertisementRenewDto);
}
